package org.example.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class SqlChangeEventListener implements ApplicationListener<SqlChangeEvent> {
    @Override
    public void onApplicationEvent(SqlChangeEvent event) {
        String changedTblName = event.getChangedTblName();
        System.out.println(changedTblName + "被修改了");
        System.out.println("接收事件："+System.currentTimeMillis());
    }
}
